/**
 * Date:2021年4月29日 下午3:00:34
 * Copyright (c) 2021, www.bwbroad.com All Rights Reserved
 */

package com.app.common.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Description: mq 消息序列化配置 <br/>
 * Date:2021年4月29日 下午3:00:34 <br/>
 * 
 * @author xuejianxin
 */
@Configuration
public class RabbitMQConfig {

	@Autowired
	ObjectMapper jacksonObjectMapper;

	// mq消息转换
	@Bean
	public MessageConverter rabbitMQJsonMessageConverter() {
		return new Jackson2JsonMessageConverter(jacksonObjectMapper);
	}

}